#include "StdAfx.h"
#include "dsegen.h"
#include "DsegenTypes.h"

namespace dhis
{

	CIndex::CIndex(void)
	{
		m_row = m_col = std::numeric_limits<int>::max();
	}

	CIndex::CIndex(const int& row,const int& col)
	{
		m_row = row;
		m_col = col;
	}

	CIndex::CIndex(const CIndex& other)
	{
		m_row = other.m_row;
		m_col = other.m_col;
	}

	CIndex& CIndex::operator=(const CIndex& other)
	{
		if (*this != other)
		{
			m_row = other.m_row;
			m_col = other.m_col;
		}
		return *this;
	}

	bool CIndex::operator==(const CIndex& other) const
	{
		return this->m_row == other.m_row && this->m_col == other.m_col;
	}

	bool CIndex::operator!=(const CIndex& other) const
	{
		return this->m_row != other.m_row || this->m_col != other.m_col;
	}

	CIndex::~CIndex(void)
	{
	}

}
